package com.mz.ozy.mvp.model;

import android.content.Context;

import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by administrator on 2018/12/3.
 */
public class ExchangeObModel {

    public Observable<ResponseBody> onExchange(Context context, String amt, String payPwd) {
        Map<String, String> maps = new HashMap<>();
        maps.put("amt", amt);
        maps.put("payPwd", payPwd);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10316, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }

    public Observable<ResponseBody> newOnExchange(Context context, String amt, String pwd) {
        Map<String, String> maps = new HashMap<>();
        maps.put("amount", amt);
        maps.put("paypwd", pwd);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10407, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }


}
